// 此文件用于配置项和相关参数设置

//详情展示页
//基本信息
//基础信息模块
const detailInfo = [
  {
    label: "设备名称",
    name: "deviceName",
    value: "1"
  },
  {
    label: "固定资产编码",
    name: "assetCode",
    value: "1"
  },
  {
    label: "设备编号",
    name: "assetNumber",
    value: "1"
  },
  {
    label: "设备类别",
    name: "deviceClass",
    value: "1"
  },
  {
    label: "设备分类",
    name: "typeName",
    value: "1"
  },
  {
    label: "使用部门",
    name: "organName",
    value: "1"
  },
  {
    label: "责任人",
    name: "responsible",
    value: "1"
  },
  {
    label: "投产日期",
    name: "productDate",
    value: "1"
  },
  {
    label: "出厂编号",
    name: "factoryNumber",
    value: "1"
  },
  {
    label: "型号",
    name: "deviceModel",
    value: "1"
  },
  {
    label: "设备原值",
    name: "assetValue",
    value: "1"
  },
  {
    label: "使用年限",
    name: "useYears",
    value: "1"
  }
  // {
  //     label: "设备主图",
  //     name: "drawPath",
  //     value: "1",
  //     isHiddan: true
  // }
];
const broadInfo = [
  {
    label: "扩展字段1",
    name: "col1",
    value: "1"
  },
  {
    label: "扩展字段2",
    name: "col2",
    value: "1"
  },
  {
    label: "扩展字段3",
    name: "col3",
    value: "1"
  },
  {
    label: "扩展字段4",
    name: "col4",
    value: "1"
  },
  {
    label: "扩展字段5",
    name: "col5",
    value: "1"
  },
  {
    label: "扩展字段6",
    name: "col6",
    value: "1"
  },
  {
    label: "扩展字段7",
    name: "col7",
    value: "1"
  },
  {
    label: "扩展字段7",
    name: "col8",
    value: "1"
  },
  {
    label: "扩展字段8",
    name: "col9",
    value: "1"
  },
  {
    label: "扩展字段9",
    name: "col10",
    value: "1"
  },
  {
    label: "扩展字段10",
    name: "col11",
    value: "1"
  },
  {
    label: "扩展字段11",
    name: "col12",
    span: 24,
    value: "123456781234567812345678123456781234567812345678"
  }
];
const histroyShowInfo = [
  {
    label: "一级 1",

    children: [
      {
        label: "二级 1-1",
        imgSrc:
          "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png"
      }
    ]
  },
  {
    label: "一级 2",
    children: [
      {
        label: "二级 2-1",
        imgSrc:
          "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png"
      },
      {
        label: "二级 2-2",
        imgSrc:
          "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png"
      }
    ]
  },
  {
    label: "一级 3",
    children: [
      {
        label: "二级 3-1",
        imgSrc:
          "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png"
      },
      {
        label: "二级 3-2",
        imgSrc:
          "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png"
      }
    ]
  }
];

const createInfo = [
  {
    label: "创建人",
    name: "createdBy",
    value: ""
  },
  {
    label: "创建时间",
    name: "createdTime",
    value: ""
  },
  {
    label: "最后更新",
    name: "updateTime",
    value: ""
  }
];

const detailShowInfo = {
  detailInfo: detailInfo,
  broadInfo: broadInfo,
  createInfo: createInfo,
  histroyShowInfo: histroyShowInfo
};
// 基础信息表单配置
const formData = {
  title: "基础信息",
  formModel: {
    deviceId: "1",
    deviceName: "1",
    fixAssetCode: "1",
    deviceNumber: "1",
    deviceType: "1",
    deviceClass: "1",
    useDepartment: "1",
    responsible: "1",
    productDate: "1",
    factoryNumber: "1",
    model: "1",
    deviceValue: "1",
    mainDrawPath: ""
  },
  formComponent: [
    {
      type: "input",
      label: "设备名称",
      model: "deviceName",
      keyUpEnter: "handleFilter",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "固定资产编码",
      model: "fixAssetCode",
      option: [1, 2, 3],
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "设备编号",
      model: "deviceNumber",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "select",
      label: "设备类型",
      model: "deviceType",
      options: [
        {
          label: "设备类型1",
          value: "1"
        },
        {
          label: "设备类型2",
          value: "2"
        }
      ],
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "select",
      label: "设备分类",
      model: "deviceClass",
      options: [
        {
          label: "设备分类1",
          value: "1"
        },
        {
          label: "设备分类2",
          value: "2"
        }
      ],
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "使用部门",
      model: "useDepartment",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "责任人",
      model: "responsible",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "datePicker",
      label: "投产日期",
      model: "productDate",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "出厂编号",
      model: "factoryNumber",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "型号",
      model: "model",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "设备原值",
      model: "deviceValue",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "upload",
      label: "设备主图",
      model: "deviceMainDrawPath",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    }
  ]
};
// 扩展字段信息
const broadData = {
  title: "扩展信息",
  formModel: {
    column1: "",
    column2: "",
    column3: "",
    column4: "",
    column5: "",
    column6: "",
    column7: "",
    column8: "",
    column9: "",
    column10: "",
    column11: "",
    column12: "",
    column13: "",
    column14: ""
  },
  formComponent: [
    {
      type: "input",
      label: "归属部门",
      model: "column1",
      keyUpEnter: "handleFilter",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "生产日期",
      model: "column2",

      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "数量",
      model: "column3",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "select",
      label: "单位",
      model: "column4",
      option: [1, 2, 3],
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "select",
      label: "使用情况",
      model: "column5",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "存放地点",
      model: "column6",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "存放位置",
      model: "column7",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "datePicker",
      label: "生产商",
      model: "column8",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "供应商",
      model: "column9",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "入账日期",
      model: "column10",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "额定功率",
      model: "column11",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "重量",
      model: "column12",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "外形尺寸",
      model: "column13",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "设备描述",
      model: "column14",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    },
    {
      type: "input",
      label: "自定义字段",
      model: "column15",
      format: "yyyy-MM-dd",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    }
  ]
};
// 档案信息
const histroyInfo = {
  title: "档案信息",
  formModel: {
    fileTitle: ""
  },
  formComponent: [
    {
      type: "upload",
      label: "设备档案",
      model: "title",
      keyUpEnter: "handleFilter",
      rules: [{ required: true, message: "请输入设备名称", trigger: "blur" }]
    }
  ]
};
//整理后的表单配置
const totalForm = [
  {
    formName: "基础信息",
    formRef: "table1", //表单ref
    formModel: formData.formModel, //表单model
    formComponent: formData.formComponent,
    formName: formData.title //表单标题
  },
  {
    fromName: "扩展信息",
    formRef: "table2", //表单ref
    formModel: broadData.formModel, //表单model
    formComponent: broadData.formComponent,
    formName: broadData.title //表单标题
  },
  {
    formName: "档案信息",
    formRef: "table3", //表单ref
    formModel: histroyInfo.formModel, //表单model
    formComponent: histroyInfo.formComponent,
    formName: histroyInfo.title, //表单标题
    formStyle: "box-margin-card"
  }
];

const data = {
  totalForm: totalForm,
  //----------表单显示相关---------//
  detailShowInfo: detailShowInfo
};
export default data;
